login and sigin logic added

needed to revise if it works