Fixed Bugs on login/register