Added devise and made a bunch of small changes