Login functionality using core java concepts