Finished with the basic user login and registration functions