[#62][#55] refactored authenticate! and authenticate methods and tests