           command: 'spark-dev:flash-cloud'
         }]
 
-      ideMenu.submenu = ideMenu.submenu.concat [{
+      devMenu.submenu = devMenu.submenu.concat [{
         type: 'separator'
       },{
         label: 'Claim device...',

      }]
    else
      # Logged out user can only log in
      ideMenu.submenu = [{
        label: 'Log in to Spark Cloud...',
        command: 'spark-dev:login'
      }]

    ideMenu.submenu = ideMenu.submenu.concat [{
      type: 'separator'
    },{
      label: 'Show serial monitor',

module.exports =
  # Get root menu
  getMenu: ->
    devMenu = atom.menu.template.filter (value) ->
      value.label == 'Spark'

    devMenu[0]

  # Update menu
  update: ->
    devMenu = @getMenu()

    if SettingsHelper.isLoggedIn()
      # Menu items for logged in user
      username = SettingsHelper.get('username')

      devMenu.submenu = [{
        label: 'Log out ' + username,
        command: 'spark-dev:logout'
      },{
