Login function implemented to get into a contentPane