Made login/register links return you to previous page.