prevent logged in user from accessing login or register page