Added login/logout/register support