basic authentication engine written for rails 4.x (in the works)