Fixed 500 error in login/check.