adds devise and tests. Fixes #24