register and login controller