refactored username_available method
refactored authenticate_user method
refactored current_user method