Simple login check functionality using core java