add before action to application controller to authenticate user