Changed login-function.