trying to add tests and implementing Login functionality