optimize login.coffee