added support for login/register