Login kind of functionality explained using Core java fundamentals