Moved  login REST logic from view to model. Added code to create the base64 encoded auth token.
expanded properties of the site model
Minor code cleanup.