Implement devise

It closes #2