Using global variables instead of current_user ones

In api controller (which is inheriting from Application Controller)