complete register and login front-end and controller