When the server returns permission-denied for any requests, the console used to redirect to login page. This was applicable for older versions of server where the server used to return permission-denied code when the access key was incorrectly given by the user.
Now the server returns access-denied code correctly in the recent versions (after alpha19) and hence this check is not required in console anymore.