patch for login and register page