add check for session on register page