redmine auth backend, restructuring libs