fixing errors in login