Added remember me flag handling
Improved the unit tests by adding a trait that creates the necessary mocks.