Added proper login-function