Implements login and remember