Extraction of bare bones current_user implementation for Rails