added devise and user stuff function