sample login and register handlers