Separated the Login Dialog to its own method and implemented the onClickListener.