refactored omniauth login and queries