update: login process and error handling