login and register modified