Fixed issue where logout was not correctly going to the login page