refactored authentication into model concern