Bugfix for categories variable in action.js controller
Sets up authentication process