changed name of app
added maestrano sso hooks
re-arranged code to limit warnings