authenticate user after registration