Gomes you can write a controller for custom login. you can find the example similar to that in devloper guide.