Change the way to check login
Change the fronted login check,
fixed the append scheme to patient,
fixed the loading of the frontend