added before filters, added profiles controller and scoping