login and bug fix