Finish authentication function using devise