Bug fix in login