Fixed remaining problems for login