Changes to api ajax refresh

basically I don't use the login.php view anymore and moved the code to a controller method. if you're just returning json, there's no need to  have a separate view for that.
Also why this:
    Session::reset();
    Session::set('auth',false);

If the session is empty, there's no need to set auth to false ( at least as far as I know)