added signin logic and devise rules