refactor current_user's login

so that it allows async login of current user
move javascripts to bottom of document

so that it shows spinning wheel