diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/bot.rb
+++ b/lib/discordrb/bot.rb
@@ -16,13 +16,15 @@ module Discordrb
       @email = email
       @password = password
 
-      @token = login()
-
-      Thread.new { websocket_connect() }
+      @token = login
 
       @event_handlers = {}
     end
 
+    def run
+      websocket_connect
+    end
+
     def message(attributes = {}, &block)
       @event_handlers[MessageEvent] ||= []
       @event_handlers[MessageEvent] << MessageEventHandler.new(attributes, block)
Extegrate the websocket connection into a separate method