Refactor Singup/Login Model and controller