diff --git a/app/assets/javascripts/application_public.js b/app/assets/javascripts/application_public.js
new file mode 100644
index 0000000000000000000000000000000000000000..31a96fd2dc5682d60e9348b66c849463fde56f81
--- /dev/null
+++ b/app/assets/javascripts/application_public.js
@@ -0,0 +1,2 @@
+//= require jquery
+//= require jquery_ujs
diff --git a/app/assets/stylesheets/accounts.scss b/app/assets/stylesheets/accounts.scss
index f2be0fcf7356e947089a36c431aa510ca763ff96..e1d5043db9dbf33034aaffd78acf92d2b1ba9603 100644
--- a/app/assets/stylesheets/accounts.scss
+++ b/app/assets/stylesheets/accounts.scss
@@ -58,6 +58,13 @@
     }
   }
 
+  .controls {
+    position: absolute;
+    top: 10px;
+    right: 10px;
+    z-index: 2;
+  }
+
   .details {
     display: flex;
     margin-top: 30px;
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 9f47517712e37a2ee0aaf06030899f602a78b30f..b169388451822fb741ef5366c7e3250b52cba6a1 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -16,6 +16,16 @@ class AccountsController < ApplicationController
     end
   end
 
+  def follow
+    FollowService.new.call(current_user.account, @account.acct)
+    redirect_to account_path(@account)
+  end
+
+  def unfollow
+    UnfollowService.new.call(current_user.account, @account)
+    redirect_to account_path(@account)
+  end
+
   def followers
     @followers = @account.followers.order('follows.created_at desc').paginate(page: params[:page], per_page: 6)
   end
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index 371bc62c30ded2cb59c030048d2cb5744f17fd6f..fb9abd6918c075ef94c5b52e5549e0bb94abe408 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -1,4 +1,11 @@
 .card{ style: "background-image: url(#{@account.header.url(:medium)})" }
+  - if user_signed_in? && current_account.id != @account.id
+    .controls
+      - if current_account.following?(@account)
+        = link_to 'Unfollow', unfollow_account_path(@account), data: { method: :post }, class: 'button'
+      - else
+        = link_to 'Follow', follow_account_path(@account), data: { method: :post }, class: 'button'
+
   .avatar= image_tag @account.avatar.url(:large)
   %h1.name
     = display_name(@account)
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 056393bba04d7503e31646f7e7feb895230a3718..0e56bef1f895d9ace0163aa34e6598452d0e8538 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -1,3 +1,6 @@
+- content_for :header_tags do
+  = javascript_include_tag 'application_public'
+
 - content_for :content do
   .container= yield
   .footer
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index 23c5b0b678c2588b8bcf21d50197432fb9bad478..14f4d1dcfbfbb5206a7a9a2b16bbb7b453821d3b 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
 
 # Precompile additional assets.
 # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-Rails.application.config.assets.precompile += %w( cable.js )
+Rails.application.config.assets.precompile += %w( application_public.js )
diff --git a/config/routes.rb b/config/routes.rb
index 4a32cdaa2806960e468f36b8225506fc00ddbc75..8f9e5fe14ee844719af9e85658a58f783df28d12 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -25,6 +25,9 @@ Rails.application.routes.draw do
     member do
       get :followers
       get :following
+
+      post :follow
+      post :unfollow
     end
   end