Refactored login models and views.
Merge pull request #18 from aleph2012/refactor-login-views-and-models

Refactored login models and views.