made lots of changes for devise