fixed redirect with login