Added devise user authentication logic.