Added admin flag to user
Refactoring code to put helper functions in the Application controller.
Restrict access to project actions to admin only.