add some code to login