Moved the csrf construct function to base controller so it extends to both the users and posts controller