Fixed login and registration according to guideline