Fixing bug in username prompt on 2.x. Also fixing logout issue.