Fixes #41, #42. Devise completed