Implements login persistence