Several fixes around login and registering new account