Implemented get_login function