improved logic for login redirect and user page
improved logic for login redirect and user page
improved logic for login redirect and user page