redirect to previous page or root_path on login success