Updating login functionality