add omniauth and refactor