login and register added - depends on api.php