Refactoring static methods from User into AppUtils class.
CSRF protection for login and register forms. Some constants moved to a
separate class.