add devise api support.
finished user's part