fix unit tests, need devise test