Changes in user type so that OAuth is also supported. 
Added a config to have a different view for login screen if required.
Merged controller file