Added a login window and a prepare message method in Connection. Created
enum types to deal with the prepare message and reduced java version
from 8 to 7 because of some enum and switch issues.