added devise and conditional if statements