implemented login.
fix resharper warning.