update function login and register
Update project ctrl