When I have registered a user, they get redirected to the login-page but I seems that my error message triggers which means that my login function is not working properly wo