register && login controller in front end