Add more sign-in tests and implement some of the functionality

Fix a bug in a sign-in test as well
Add remember_token tests and a base implementation the populates the token
Add cookie management for the signed in user
Add rest of core sign-in functionality