added rails authentication