Changed the login handling
Solved merging conflicts and implemented login and register db side and works