how to set loginPath in config file
OK, no one answered....I have to take another way to do which is to put a piece of code like this into user-profile page

{% if not currentUser %}
  {% redirect '/' %}
{% endif %}


and take out loginPath setting in config file.