Added polling to redirect once a session has been logged in