Added access check for login/register