def login(): user = User("testuser") login_user(user) # notify the change of role identity_changed.send(current_app._get_current_object(), identity=Identity("testuser")) return redirect("/blog")