implementation of the login