Fixing login problem when token is expired