working ajax login/register, toast messages, etc