oauthclient: authorize url fix

* Changes authorize url to redirected to login form
  instead of register.

* Moves imports inside functions.

* Closes #2487.

Sign-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>