public HandshakeToken BeginLogin(LoginCredentials credentials)
        {
            lock (sessions)
            {
                RemoveExpiredSessions();

                var user = users.SingleOrDefault(u => u.Username == credentials.Username);
                if (user != null)
                {
                    if (user.Password == credentials.Password)
                    {
                        var toRet = new HandshakeToken(GetNewHash(), GetHandshakeExpiryFromNowUtc());
                        sessions.Add(new Session
                        {
                            Owner          = user,
                            HandshakeToken = toRet
                        });
                        return(toRet);
                    }
                }
                throw new FaultException("Bad username or password");
            }
        }
 public HandshakeToken BeginLogin(LoginCredentials credentials)
 {
     return(Auth.Provider.BeginLogin(credentials));
 }