added states for register and login user