updating login function again