added functional login