finish of login and register; finish unit tests for login and register