changes in login function